<?php echo $header; ?>
<div id="main" role="main"> 
            <section id="container">
            	<!-- breadcumbs-->
                <div id="breadcumbs">
                    <ol class="breadcumbs">
                    	<?php for ($i=0;$i<sizeof($breadcrumbs);$i++) { ?>
                           
                            
                            <?php if($i+1==sizeof($breadcrumbs)) { ?>
                                 <li class="item current"><?php echo $breadcrumbs[$i]['text']; ?></li>
                            <?php } else { ?>
                            	<?php if($i==0) { ?>
                                	<li class="first root">
                                        <a href="<?php echo $breadcrumbs[$i]['href']; ?>">
                                            
                                        </a>
                               		</li>
                                <?php } ?>
                                <?php if($i==1) { ?>
                                	<li class="first root-cate"><?php echo $breadcrumbs[$i]['text']; ?></li>
                                <?php } ?>
                                <?php if($i>1) { ?>
                                	<li class="first child-cate"><a href="<?php echo $breadcrumbs[$i]['href']; ?>"><?php echo $breadcrumbs[$i]['text']; ?></a></li>
                                <?php } ?>
                            <?php } ?>
                        <?php } ?>
                        <!--
                        <li class="first root"><a title="home" href="index.php"></a></li>
                        <li class="item root-cate">OUT DOOR</li>
                        <li class="item child-cate">Furniture</li>
                        <li class="item child-cate">Mix [ wood/metal ]</li>
                        <li class="item current">Outdoor set 4 chairs</li>-->
                    </ol>
                </div>
                <!-- /breadcumbs-->
                
                                        
                <div class="post product-detail">
             	   <h1><?php echo $heading_title; ?></h1>
                        
                	<div class="prd-photo fll">
                   		<?php if ($thumb) { ?>
                        <a title="" href="<?php echo $popup;?>" id="magicZoomPlus" class="MagicZoomPlus" ><img alt="<?php echo $heading_title; ?>" src="timthumb.php?src=<?php echo $thumb;?>&w=575&h=400"></a>
                        <span><?php echo $text_click_image;?></span>
                            <?php if ($images) { ?>
                                <div class="prd-img-thumbs">
                                	<?php foreach ($images as $image) { ?>
                                    <a class="prd-thumb" title="<?php echo $heading_title; ?>" rev="<?php echo $image['popup']; ?>" rel="magicZoomPlus" href="<?php echo $image['popup']; ?>"><img src="timthumb.php?src=<?php echo $image['popup'];?>&w=135&h=105"></a>
                                    <?php } ?>
                                </div>
                        	<?php } ?>
                        <?php } ?>
                    </div>
                    <div class="prd-info flr">
                    	
                        	<?php if($special) {
                            ?>
                                 <div class="promo">
                                    <div class="discount fll">
                                        <span class="label">PROMO</span><br>
                                        <span class="minus">-</span>
                                        <span class="discount-num"><?php echo $price_percent;?></span>
                                        <span class="percent">%</span>
                                    </div>
                                    <div class="price fll">
                                        <div class="prev-price">
                                            <p class="tt fll"><?php echo $text_before;?>:</p>
                                            <p class="price-num fll"><?php echo $price;?><span class="strike"></span></p>
                                        </div>
                                        <div class="current-price">
                                            <p class="tt fll"><?php echo $text_now;?>:</p>
                                            <p class="price-num fll"><?php echo $special;?></p>
                                        </div>
                                    </div>
                                </div>
                                
                            <?php
                            } else {
                            ?> 
                            <div class="no-promo">
                                <div class="price fll">
                                    <div class="current-price">
                                        <p class="tt fll"><?php echo $text_price;?></p>
                                        <p class="price-num fll"><?php echo $price;?></p>
                                    </div>
                                </div>
                            </div>
                               
                            <?php
                            } ?>
                        	
                            
                        <div class="extra-gap"></div>
                        <?php echo $short;?>
                        <p><a href="#moreInfo" class="more cboxElement"><?php echo $text_readmore_product;?></a></p>
                        
                      <p>
                      <input class="input-txt" type="hidden" name="quantity" value="1" size="3"/>
                      <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
          			 	                            
                        <a id="button-cart" class="add-to-selections-btn"><?php echo $text_add_my_selections;?></a>
                        </p>
                        
                        <!-- Activate this confirm dialog when add to my selections successful-->
                        <div style="display:none" id="add-selection-confirm">
                        	<p><strong><?php echo $text_add_cart_success;?></strong></p>
                            <div class="buttons">
                            	<a href="<?php echo $this->url->link('checkout/cart');?>" class="view-selection-btn fll"><?php echo $text_view_my_selections;?></a>
                                <a onclick="$('#add-selection-confirm').hide();" class="close-btn fll"><?php echo $text_close;?></a>
                            </div>
                      </div>
                        
                    </div>
                    <div class="clr"></div>
                    <div class="prd-general">
                    	<div class="prd-notes fll">
                        	<?php echo $short_info;?>
                        </div>
                        <div class="prd-contact flr">
                        	<p><?php echo $text_more_info;?></p>
                            <p><a href="<?php echo $this->url->link('information/contact');?>" class="contact-btn"><?php echo $text_contactus;?></a></p>
                        </div>
                        <div class="clr"></div>  
                    </div>
                    <a onclick="javascript:history.back();" class="back"><?php echo $text_back;?></a>
                </div>
                
                <!--More infos detail for product-->
                <div style="display: none">
                    <div style="background: #fff" id="moreInfo">
                        <?php echo $description;?>
                    </div>
                </div>
                <!--/More infos detail for product-->
                <?php 
                    if(isset($products)&&sizeof($products)>0) {
                ?>
                <div class="heading-tt">
                    <h1 class="fll"><span><?php echo $tab_related;?></span></h1>
                    
                </div>
                
            	<div class="overlay-group group">
                	<ul class="product-list">
                    	<?php foreach ($products as $rs) { ?>
                          <li class="overlay-block">
                           <a class="img-product" href="<?php echo $rs['href'];?>"><div class="overlay"></div>
                         		<?php
                                    if($rs['special']) {
                                ?>
                                                    <p class="promo-tag">
                                                        <span class="minus">-</span>
                                                        <span class="discount-num"><?php echo ($rs['price_percent']);?></span>
                                                        <span class="percent">%</span>
                                                    </p>
                                <?php 
                                    }
                                ?>
                                <p>
                                    <span class="prd-name"><?php echo $rs['name'];?></span>
                                    <span class="price flr"><?php if($rs['special']) {echo $rs['special'];} else { echo $rs['price'];} ?></span>
                                </p>
                                <img src="timthumb.php?src=<?php echo $rs['thumb'];?>&w=295&h=230" alt="<?php echo $rs['name'];?>" />
                            </a>
                            </li>
                        <?php } ?>   
                    </ul>
                </div>
                <?php } ?>    
            </section>
        </div>
<script type="text/javascript">
$(function(){
		$('#button-cart').bind('click', function() {
		$.ajax({
			url: 'index.php?route=checkout/cart/update',
			type: 'post',
			//data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
			data: $('.product-detail input[type=\'text\'], .product-detail input[type=\'hidden\'], .product-detail input[type=\'radio\']:checked, .product-detail input[type=\'checkbox\']:checked, .product-detail select, .product-detail textarea'),
			/*data: $('#productDetail input[type=\'text\'], #productDetail input[type=\'hidden\']'),*/
			dataType: 'json',
			success: function(json) {
				$('.success, .warning, .attention, information, .error').remove();
				
				if (json['error']) {
					if (json['error']['warning']) {
						$('#alert').html(json['error']['warning']);
						$('#backoverlay').show();
						$('#show_popup').show();
						/*								
						$('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
						$('.warning').fadeIn('slow');
						*/
					}
					
					for (i in json['error']) {
						//$('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>');
						$('#alert').html(json['error'][i]);
						$('#backoverlay').show();
						$('#show_popup').show();
						exit();
					}
				}	 
							
				if (json['success']) {
					//$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
						
					//$('.success').fadeIn('slow');
					
					/*$('#cart_total').html(json['total']);
					$('#cart_title').attr('title',json['total']);
					$('#cart_title').aToolTip(); 
					$('html, body').animate({ scrollTop: 0 }, 'slow'); 
					*/
					/*
					$('#alert').html('<?php echo $text_add_cart_success;?>');
					$('#backoverlay').show();
					$('#show_popup').show();
					*/
					$('#add-selection-confirm').show();
					//setTimeout('close_popup()',4000);
						
				}	
			}
		});
	});
});
</script>        
<?php echo $footer; ?>
<?php return;?>







<?php echo $header; ?>
		<div id="main">
                        	
                            <!-- Begin main-content  -->
                            <div id="content" class="no-sidebar fl-left">
                            	<!-- Breadcumbs  -->
                            	<div id="breadcumbs" class="fl-left">
                                	<ul id="crumbs">
                                    <?php for ($i=0;$i<sizeof($breadcrumbs);$i++) { ?>
                                    	<li>
                                        
                                        <?php if($i+1==sizeof($breadcrumbs)) { ?>
                                        	<span><?php echo $breadcrumbs[$i]['text']; ?></span>
                                        <?php } else { ?>
                                      		<a href="<?php echo $breadcrumbs[$i]['href']; ?>">
                                       		<?php echo $breadcrumbs[$i]['text']; ?>
                                            </a>
                                        <?php } ?>
                                        
                                        </li>
                                     <?php } ?>
                                        
                                    </ul>
                                </div>
                                <!-- /Breadcumbs  -->
                                
                                <!-- product detail-->
                                <div id="productDetail">
                                	<div class="prd-detail-inner">
                                    	<h1 class="tt-h1"><?php echo $heading_title; ?></h1>
                                        <div class="prd-img-ctn fl-left">
                                            <div class="img-holder">
                                            <?php if ($thumb) { ?>
      										<img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" />
      										<?php } ?>
                                            </div>
                                        </div>
                                        <div class="prd-desc-ctn fl-left">
                                            <div class="prd-price">
                                            	<p>
                                                	<span>Giá:</span>
                                                    <?php if ($price >0) { ?>
                                                    
                                                        <?php if (!$special) { ?>
                                                        <span class="price-num"><?php echo $price; ?></span>
                                                        <?php } else { ?>
                                                        <span class="price-old"><?php echo $price; ?></span> <span class="price-num"><?php echo $special; ?></span>
                                                        <?php } ?>
                                                        <em>(Bao gồm thuế)</em>
                                                    <?php } else  { ?>
                                                    <?php echo $chuacogia;?>
                                                    <?php } ?>
                                                	
                                                </p>
                                                <p class="rating">
                                                    <span class="min-rating-star inline-block">
                                                        <span style="width: <?php echo ($rs['ratingproduct']+1)*20; ?>%;" class="min-rating-star rated"></span>
                                                    </span>
                                                </p>
                                                <!-- enable this line if the the price is not set-->
                                                <!--a class="contact" href="ymsgr:sendIM?shopmebuu31daotan">Liên hệ</a-->
                                            </div>
                                            <?php if($short) { ?>
                                            <div class="prdInfo">
                                                <h3>Thông tin sản phẩm:</h3>
                                                <p>
                                                 <?php echo $short; ?>
                                                </p>
                                            </div>
                                            <?php } ?>
                                            
                                            <div class="order">
                                                <h3>Đặt hàng:</h3>
                                                <p>
                                                	<label>Số lượng:</label><input class="input-txt" type="text" name="quantity" value="1" size="3"/>
                                                    
                                                    <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
          
                                                    <span class="clear"></span>
                                                    <a id="button-cart" class="add-cart"></a>
                                                    <!--Or use input button
                                                    <input class="add-cart" type="button" />
                                                    -->
                                                </p>
                                            </div>
                                            
                                            <div class="fb">
                                                <img class="fl-left" src="catalog/view/theme/default/img/mb-fb.png" alt="" />
                                                <div class="mb-fb fl-left">
                                                    <p><strong>Trên Facebook</strong> </p>
                                                    
                                                    <div class="fb-like" data-href="<?php echo 'http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];?>" data-send="false" data-layout="button_count" data-width="115" data-show-faces="false" data-font="lucida grande"></div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="clear"></div>
                                        <div class="support">
                                            <p class="fl-left col-08">Nếu có thắc mắc vui lòng liên hệ hotline <strong>0904 393 688</strong> (<strong>Mrs Tâm</strong>)<br />để được giải đáp và tư vấn tận tình.</p>
                                            <p class="fl-left col-02">
                                            	<a class="tip" href="ymsgr:sendIM?shopmebuu31daotan" title="Yahoo id: shopmebuu15bdaotan"><img src="catalog/view/theme/default/img/ym_online.png" alt=""/></a>
                                                <a class="tip" href="callto://shopmebuu-15b-daotan" title="skype id: shopmebuu15bdaotan"><img src="catalog/view/theme/default/img/skype_online.png" alt=""/></a>
                                            </p>
                                        </div>
                                        
                                        <div class="prdDesc">
                                        	<script type="text/javascript" src="catalog/view/theme/default/js/tabs.js"></script> 
                                        	<div class="htabs">
                                                <ul class="tabs">
                                                    <li class="first"><a href="#prdDetail">Chi tiết sản phẩm</a></li>
                                                    <li>
                                                    	<a href="#prdRating">
                                                            <p class="rating fl-right">
                                                                <span class="min-rating-star inline-block">
                                                                    <span class="min-rating-star rated" style="width: 95%;"></span>
                                                                </span>
                                                            </p>
                                                            Đánh giá sản phẩm
                                                      	</a>
                                                	</li>
                                                </ul>
                                                <div id="prdDetail" class="tab-content">
                                                   <?php echo $description; ?>
                                              
                                                </div>
                                                
                                                <div id="prdRating" class="tab-content">
                                                	<h3>Đánh giá sản phẩm</h3>
                                                    <div id="review"></div>
                                                    
                                                    
                                                     <div class="rating-form">
                                                     <div style="clear:both;padding-top:5px;" id="review-title"></div>
                                                         <form id="ratingForm" method="" action="">
                                                            <fieldset>
                                                            	<h3>Đánh giá của bạn:</h3>
                                                                <div class="rating-choice">
                                                                    <label class="quality">Chất lượng:</label>
                                                                    <div class="rating fl-left">
                                                                        <label for="quality01">
                                                                            <input id="quality01" class="quality1" type="radio" value="1" name="Rating-Quality" checked="checked"/>
                                                                            <span class="active" title="1"></span>
                                                                        </label>
                                                                        <label for="quality02">
                                                                            <input id="quality02" class="quality1" type="radio" value="2" name="Rating-Qualit" />
                                                                            <span title="2"></span>
                                                                        </label>
                                                                        <label for="quality03">
                                                                            <input id="quality03" class="quality1" type="radio" value="3" name="Rating-Quality" />
                                                                            <span title="3"></span>
                                                                        </label>
                                                                        <label for="quality04">
                                                                            <input id="quality04" class="quality1" type="radio" value="4" name="Rating-Quality" />
                                                                            <span title="4"></span>
                                                                        </label>
                                                                        <label for="quality05">
                                                                            <input id="quality05" class="quality1" type="radio" value="5" name="Rating-Quality" />
                                                                            <span title="5"></span>
                                                                        </label>
                                                                        <input type="hidden" value="1" name="quanlity_ct" id="quanlity_ct" />
                                                                    </div>
                                                                </div>
                                                                <div class="rating-choice">
                                                                    <label class="quality">Giá:</label>
                                                                    <div class="rating fl-left">
                                                                        <label for="price01">
                                                                            <input id="price01" class="price1" type="radio" value="1" name="Rating-Price-01" checked="checked"/>
                                                                            <span class="active" title="1"></span>
                                                                        </label>
                                                                        <label for="price02">
                                                                            <input id="price02" class="price1" type="radio" value="2" name="Rating-Price-02" />
                                                                            <span title="2"></span>
                                                                        </label>
                                                                        <label for="price03">
                                                                            <input id="price03" class="price1" type="radio" value="3" name="Rating-Price-03" />
                                                                            <span title="3"></span>
                                                                        </label>
                                                                        <label for="price04">
                                                                            <input id="price04" class="price1" type="radio" value="4" name="Rating-Price-04" />
                                                                            <span title="4"></span>
                                                                        </label>
                                                                        <label for="price05">
                                                                            <input id="price05" class="price1" type="radio" value="5" name="Rating-Price-05" />
                                                                            <span title="5"></span>
                                                                        </label>
                                                                        <input type="hidden" value="1" name="price_ct" id="price_ct" />
                                                                    </div>
                                                                </div>
                                                                
                                                        <h3>Ý kiến đánh giá của bạn:</h3>
                                                                <p class="input-set comment">
                                                                	<label>Tên của bạn<span>*</span></label>
                                                                    <input class="input-txt" type="text" value="" name="name" />
                                                                </p>
                                                                <p class="input-set comment">
                                                                    <label>Chủ đề<span>*</span></label>
                                                                    <input class="input-txt" type="text" value="" name="subject" />
                                                                </p>
                                                                <p class="input-set comment">
                                                                    <label>Ý kiến<span>*</span></label>
                                                                    <textarea cols="20" rows=" 20" name="text"></textarea> 
                                                                </p>
                                                                
                                                                
                                                                 <p class="input-set comment">
                                                                    <label><?php echo $entry_captcha; ?><span>*</span></label>
                                                                    <input type="text" name="captcha" value="" /></p>

<p class="input-set comment" style="padding-top:5px;"> <label></label>   <img src="index.php?route=product/product/captcha" alt="" id="captcha" />
                                                                </p>
                                                                
                                                                <div class="form-submit">
                                                                	<input class="btn button" type="button" value="Gửi" id="button-review" />
                                                                    <input class="btn button" type="reset" value="Soạn lại" onclick="$('#ratingForm')[0].reset();return false;" />
                                                                    <input type="hidden" name="captcha" value="" />
                                                                </div>
                                                                
                                                            </fieldset>
                                                         </form>
                                                	</div>
                                                </div>
                                              
                                       		</div>
                                    	</div>

                                	</div>
                                    <div class="related-prd">
                                    	<h3>Sản phẩm liên quan</h3>
                                        <ul class="prd-list related">
                                        <?php if ($products) { ?>
                                        <?php foreach ($products as $product) { ?>
                                          <li>
                                          <?php if ($product['thumb']) { ?>
                                                <a class="thumb" title="<?php echo $product['name']; ?>" href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a>
                                          <?php } ?>
                                                <a class="prd-tt" href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a>
                                                <?php if ($product['price'] >0) { ?>
                                                <p class="price active">Giá : <strong>900.000 VND</strong></p>
                                                <?php } else {
                                                ?>
                                                <p class="price active">Giá : <a href="ymsgr:sendIM?shopmebuu15bdaotan">Liên hệ</a></p>
                                                <?php
                                                }
                                                ?>
                                                <?php if((int)$product['is_new'] == 1) {?>
                                                <span class="new"><img src="catalog/view/theme/default/img/new.png" alt="Mới" /></span>
                                                <?php } ?>
                                            </li>
                                        <?php } ?>    
                                         
                                        </ul>
                                        <?php } ?>    
                                    </div>
                                </div>
                                <!-- /product detail-->

                            </div>
                            <!-- / main-content  -->
                              
                            <!-- /end mid-content  -->
                            
                        </div>
     </div>   
     
     
     
<script type="text/javascript"><!--

$(function(){
	
	$(".quality1").bind('click', function() {
			//alert($(this).val());
			$(".quality1").next("span").attr("class","");
			$(".quality1").attr("checked","");
			for($i=1;$i<=$(this).val();$i++)
			{
				$("#quality0"+$i).next("span").attr("class","active");
			}
			$("#quanlity_ct").val($(this).val());
			
	});
	$(".price1").bind('click', function() {
			//alert($(this).val());
			$(".price1").next("span").attr("class","");
			$(".price1").attr("checked","");
			for($i=1;$i<=$(this).val();$i++)
			{
				$("#price0"+$i).next("span").attr("class","active");
			}
			$("#price_ct").val($(this).val());
			
	});
});

$('#button-cart').bind('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/cart/update',
		type: 'post',
		//data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		data: $('#productDetail input[type=\'text\'], #productDetail input[type=\'hidden\'], #productDetail input[type=\'radio\']:checked, #productDetail input[type=\'checkbox\']:checked, #productDetail select, #productDetail textarea'),
		/*data: $('#productDetail input[type=\'text\'], #productDetail input[type=\'hidden\']'),*/
		dataType: 'json',
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
			
			if (json['error']) {
				if (json['error']['warning']) {
					$('#alert').html(json['error']['warning']);
					$('#backoverlay').show();
					$('#show_popup').show();
					/*								
					$('#notification').html('<div class="warning" style="display: none;">' + json['error']['warning'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
					$('.warning').fadeIn('slow');
					*/
				}
				
				for (i in json['error']) {
					//$('#option-' + i).after('<span class="error">' + json['error'][i] + '</span>');
					$('#alert').html(json['error'][i]);
					$('#backoverlay').show();
					$('#show_popup').show();
					exit();
				}
			}	 
						
			if (json['success']) {
				//$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
					
				//$('.success').fadeIn('slow');
				
				$('#cart_total').html(json['total']);
				$('#cart_title').attr('title',json['total']);
				$('#cart_title').aToolTip(); 
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
				
				$('#alert').html('Thêm giỏ hàng thành công');
				$('#backoverlay').show();
				$('#show_popup').show();
				//setTimeout('close_popup()',4000);
					
			}	
		}
	});
});

//--></script>  
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').slideUp('slow');
		
	$('#review').load(this.href);
	
	$('#review').slideDown('slow');
	
	return false;
});			

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
	$.ajax({
		type: 'POST',
		url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
		dataType: 'json',
		data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&subject=' + encodeURIComponent($('input[name=\'subject\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'quanlity_ct\']').val()) + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()) + '&price=' + encodeURIComponent($('input[name=\'price_ct\']').val()) + '&quanlity_ct=' + encodeURIComponent($('input[name=\'quanlity_ct\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#button-review').attr('disabled', true);
			//$('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#button-review').attr('disabled', false);
			$('.attention').remove();
		},
		success: function(data) {
			if (data.error) {
				//$('#review-title').after('<div class="warning">' + data.error + '</div>');
				$('#review-title').html('<div  class="message warning">' + data.error + '</div>');
			}
			
			if (data.success) {
				//$('#review-title').after('<div class="success">' + data.success + '</div>');
				$('#review-title').html('<div  class="message warning">' + data.success + '</div>');	
				//$(".rating-form").html("");			
				$('input[name=\'name\']').val('');
				$('input[name=\'subject\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').attr('checked', '');
				$('input[name=\'captcha\']').val('');
			}
		}
	});
});
//--></script>    
<?php echo $footer; ?>